/**
 * @Author：ming
 * @Date：2023/9/25 11:37 PM
 * @Filename：Lc392
 */

/**
 * @author ming
 */
public class Lc392 {
    public boolean isSubsequence(String s, String t) {
        char[] c = s.toCharArray();
        for (int i = 0; i < c.length; i++) {
            int j = t.indexOf(c[i]);
            if(j==-1){
                return false;
            }else {
                t = t.substring(j+1);
            }
        }

        return true;
    }
}
